<?php

/**
 * @file
 * Template file for one row, rendered by heartbeat
 *
 * @var
 * - $message : after it was parsed by heartbeat (grouped)
 * - $time_info : information about the time of activity
 * - $class : extra classes to use on the row
 * - $attachments : attachment on the message id (of the grouped message)
 *
 * @remarks
 *   beat-item-<uaid> is necessairy. The beat item id is used to toggle
 *   visibility of the "number more" messages when grouping exceeded the
 *   maximum allowed grouped property.
 */
?>

<div class="heartbeat-message-block <?php print $class; ?>">

  <div class="beat-item" id="beat-item-<?php print $message->uaid ?>">
    <?php print $message->message; ?>
    <?php if (!empty($time_info)): ?>
    <span class="heartbeat_times"><?php print $time_info; ?></span>
    <?php endif; ?>

    <?php print $buttons; ?>
  </div>
  <div class="clear"></div>

  <?php if (!empty($attachments) && is_array($attachments)) : ?>
  <div class="heartbeat-attachments">
    <?php print implode(" ",$attachments); ?>
  </div>
  <?php endif; ?>

</div>